//
//  UITextField+Placeholder.m
//  BuDeJie
//
//  Created by haoran on 16/4/6.
//  Copyright © 2016年 xuhaoran. All rights reserved.
//

#import "UITextField+Placeholder.h"
#import <objc/message.h>

@implementation UITextField (Placeholder)
/**
 *  设置占位文字颜色
 */
-(void)setPlaceholderColor:(UIColor *)placeholderColor{
    
    if (self.placeholder == nil) {
        self.placeholder = @" ";
    }
    UILabel * placeholderLabel = [self valueForKey:@"placeholderLabel"];
    placeholderLabel.textColor = placeholderColor;

}
/**
 *  范围占位文字颜色
 */
-(UIColor *)placeholderColor{
    return nil;
}
@end
